<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>实现移动端Retina屏幕1px边框的7种方法-1</title>
        <style>
            .border-bottom-1px {
              border-width: 0 0 1px 0;
              -webkit-border-image: url(../img/mobile/1px-border.png) 0 0 2 0 stretch;
              border-image: url(../img/mobile/1px-border.png) 0 0 2 0 stretch;
            }
            .border-image-1px {
              border-width: 1px 0;
              -webkit-border-image: url(../img/mobile/1px-border.png) 2 0 stretch;
              border-image: url(../img/mobile/1px-border.png) 2 0 stretch;
            }
            .border-image-1px {
              border-bottom: 1px solid #666;
            }
            @media only screen and (-webkit-min-device-pixel-ratio: 2) {
              .border-image-1px {
                border-bottom: none;
                border-width: 0 0 1px 0;
                -webkit-border-image: url(../img/mobile/1px-border.png) 0 0 2 0 stretch;
                border-image: url(../img/mobile/1px-border.png) 0 0 2 0 stretch;
              }
            }
        </style>
    </head>
    <body>
        <h1>实现移动端Retina屏幕1px边框的7种方法</h1>
        <p>来源:<a href="http://www.yyyweb.com/4950.html"></a></p>
        <h2>2、使用border-image实现</h2>
        <h2>解决方案：</h2>
        <p>解决方案是通过 JavaScript 检测浏览器能否处理0.5px的边框，如果可以，给html标签元素添加个class。</p>
        <p>优点：</p>
        <p>可以设置单条,多条边框</p>
        <p>没有性能瓶颈的问题</p>
        <p>缺点：</p>
        <p>修改颜色麻烦, 需要替换图片</p>
        <p>圆角需要特殊处理，并且边缘会模糊</p>
        <div class="border-image-1px">1px边框</div>
        <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
        <script>
        </script>
    </body>
</html>